package com.xuhai.blog.admin.service.impl;

import com.xuhai.blog.admin.entity.ArticleEntity;
import com.xuhai.blog.admin.entity.Timeline;
import com.xuhai.blog.admin.mapper.TimelineMapper;
import com.xuhai.blog.admin.service.TimelineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author PangJunjie
 * @Date 2022/2/19/019
 */
@Service
public class TimelineServiceImpl implements TimelineService {

    @Autowired
    private TimelineMapper timelineMapper;

    @Override
    public List<Timeline> getTimeLine() {
        return timelineMapper.getTimeline();
    }

    @Override
    public List<ArticleEntity> getArticleListByYear(String year) {
        return timelineMapper.getArticleListByYear(year,null);
    }
}
